import {allRquest} from "../utils/request.js"

const ExamineeLogin=(data)=>{
	return allRquest({
			url:'/Account/ExamineeLogin',
			method:'post',
			data:data
		})
}

const GetExamineeInfo=()=>{
	return allRquest({
			url:'/Examinee/GetExamineeInfo',
			method:'post',
		})
}

const GetExamNoticeByExaminee=()=>{
	return allRquest({
			url:'/QuestionManagement/GetExamNoticeByExaminee',
			method:'post',
		})
}

const GetExamNoticeByExamineeOut=()=>{
	return allRquest({
			url:'/QuestionManagement/GetAttention',
			method:'post',
		})
}
// http://139.9.200.37:8080/QuestionManagement/GetAttention
const GetQuestionSortList=()=>{
	return allRquest({
			url:'/Examination/GetQuestionSortList',
			method:'post',
		})
}

const CreateExaminationPaper=()=>{
	return allRquest({
			url:'/QuestionManagement/CreateExaminationPaper',
			method:'post',
		})
}


const GetSingleQuestion=(data)=>{
	return allRquest({
			url:'/Examination/GetSingleQuestion',
			method:'post',
			data
		})
}

const SetExamOption=(qid,oid)=>{
	return allRquest({
			url:'/Examination/SetExamOption',
			method:'post',
			data:{
				QuestionId:qid,
				OptionId:oid
			}
		})
}

const Collect=(Id,check)=>{
	return allRquest({
			url:'/QuestionManagement/Collect',
			method:'post',
			data:{
				Id:Id,
				check:check
			}
		})
}
const SetExamChkOption=(qid,oid,ischeck)=>{
	return allRquest({
			url:'/Examination/SetExamChkOption',
			method:'post',
			data:{
		QuestionId:qid,
		OptionId:oid,
		IsCheck:ischeck
			}
		})
}

const SubmitExam=()=>{
	return allRquest({
			url:'/Examination/SubmitExam',
			method:'post',
		})
}

const UpdateAnswer=(id,content)=>{
	return allRquest({
			url:'/Examination/UpdateAnswer',
			method:'post',
			data:{
				ItemId:id,
				Content:content
			}
		})
}

const FillInQuestion=(id,content,sort)=>{
	return allRquest({
			url:'/Examination/FillInQuestion',
			method:'post',
			data:{
				ExaminationQuestionId:id,
				Content:content,
				sortNo:sort
			}
		})
}
const PreSubmitCheck=()=>{
	return allRquest({
			url:'/Examination/PreSubmitCheck',
			method:'post',
		})
}
const getCompanyName=()=>{
	return allRquest({
			url:'/Account/GetExamInfo',
			method:'post',
		})
	// return new Promise((resolve,rej)=>{
	// 	resolve({
	// 		Data:"上海利章 ©上海泽典信息科技有限公司"
	// 	})
	// })
}

const nFillInQuestion=(id,content)=>{
	return allRquest({
			url:'/Examination/FillInQuestion',
			method:'post',
			data:{
				ExaminationQuestionId:id,
				Content:content,
				sortNo:1
			}
		})
	// return new Promise((resolve,rej)=>{
	// 	resolve({
	// 		Data:"上海利章 ©上海泽典信息科技有限公司"
	// 	})
	// })
}

export{PreSubmitCheck,GetExamNoticeByExamineeOut,FillInQuestion,UpdateAnswer,SubmitExam,SetExamChkOption,ExamineeLogin,GetExamineeInfo,GetExamNoticeByExaminee,GetQuestionSortList,CreateExaminationPaper,GetSingleQuestion,SetExamOption,Collect,getCompanyName,nFillInQuestion}